home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / baycom / tfpcx.eng < prev    next >
Encoding:
Text File  |  1992-09-24  |  21.2 KB  |  482 lines

  1. The following is a first draft of a translation into english of the
  2. TFPCX Documentation.
  3. Translated by : Wolfgang Hartmuth,DG2MDJ
  4. PR-Mail       : DG2MDJ@DB0KCP.DEU.EU
  5. E-Mail        : wolfgang_hartmuth@mentorg.com
  6. Any comments or correction are welcome.
  7.  
  8. Comment : Due to changes in Y2 call signs may change !
  9. ====================================================================
  10.  
  11.     TFPCX v1.00 - resident Firmware for SP ( PC ) without TNC
  12.          (Free for Ham's, may not be used comercially)
  13.  
  14.                   René Stange, Y51GE
  15.  
  16.            Introduction
  17.                 =============
  18.    Finally it is finished. Now the comfortable and wide spread
  19.    terminal program SP developed by Sigi (DL1MEN) may be used
  20.    on IBM's and compatible ( minimum required XT 8MHz ) without
  21.    the need for a TNC. All you need a simple modem ( like Baycom
  22.    or Digicom ) attached to COM1-4 or LPT1-4 and the program TFPCX.
  23.    TFPCX interacts with SP similar to TFPCR, the KISS driver which
  24.    is part of SP. Handling of TFPCX is similar to TFPCR. For more
  25.    information read the SP documentation [1]. On the other hand
  26.    TFPCX is more or less compatible to TheFirmware v2.1c of 
  27.    NORD><LINK. This software is used on the TNC2. Some knowlegde
  28.    in how to work with TheFirmware is a good advantage. The
  29.    program may also be used without SP and therefor contains
  30.    some simple terminal routines, which is of interest for 
  31.    owners of slow PC's. The program does not work on ATARI ST.
  32.    
  33.  
  34. Copyright
  35. ---------
  36.    TFPCX is a Public Domain program and may be used by hams.
  37.    It may be distributed. Comercial use or comercial selling
  38.    is strictly prohibited.
  39.    No warranty for any failure of this program.
  40.    The author shall not be liable for any damage what so ever,
  41.    which may be related to the use of this program.
  42.    The program was written by Y51GE using sources of the
  43.    PD program TFPCR v1.60 (DL1MEN), which uses PD sources of
  44.    TheFirmware v2.1c by NORD><LINK (DC4OX/DF2AU)
  45.    
  46. Warning
  47. -------
  48.    If you find out that the program can not correctly decode
  49.    or encode AX25-frames, immediately stop the program and
  50.    use other solutions. This should be done in order to relieve
  51.    the digipeater of useless transmisions. Specially on XT's
  52.    you should observe the monitor window, in order to judge on
  53.    the quality of decoding/encoding.   
  54.    
  55. History of developement
  56. -----------------------
  57.    March 1990 I started having interest in packet radio, but
  58.    I did not want to buy standard equipement. I heard about
  59.    the program DigiCom and was sure that a similar solution
  60.    for the PC must be feasible. I started to collect information
  61.    about AX25 protocol and with the help of a PC and tape copies
  62.    of the Berlin QRG I tried to decode AX25. That's the way the
  63.    routine for decoding were developed. The biggest problem arose
  64.    in calculating the CRC and creating the routine for transmision.
  65.    At that time I did not have a license, so my brother Mike
  66.    (Y42LK) took over first tests. He also supplied me with modems.
  67.    So I proved that the PC is capable of directly controling
  68.    a modem.
  69.    
  70.    When I first puplished my idea in oct. 1990, there was lots
  71.    of interest in my program. Also I had good feed back that the
  72.    DigiCom team was working on a similar solution. When I asked
  73.    Johannes (DG3RBU), I got the answer that the Baycom solution
  74.    was about to be finished. At that time I came in touch with 
  75.    terminal programs for the TNC, so I had the idea of extenting
  76.    those programs with my HDLC routines. I started with Superkiss 3.0
  77.    and wrote a driver which redirected the KISS data onto my routine.
  78.    Next followed SP5.02 and the TCP/IP package by KA9Q. All these
  79.    solutions were working well, but had a big disadvantage. There
  80.    was a need of patching the terminal programs, which is not a 
  81.    portable solution and must stick to specific versions of the
  82.    terminal program. Because of this I wrote to Sigi (DL1MEN)
  83.    who imediately gave me the sorce code for TFPCR ( again,
  84.    many thanks to him).
  85.    
  86. Quickstart
  87. -----------
  88.    For those who have a Baycom modem for 1200 baud and want
  89.    to test it themselves :
  90.       - those who are still working with a XT should better
  91.         continue reading, it must be tested if this machine
  92.     is fast enough
  93.       - install SP (v5.02 and higher) as if you want to use
  94.         TFPCR
  95.       - replace TFPCR.COM with TFPCX.EXE
  96.       - attach the Baycom modem to a com port
  97.       - enter the command 'TFPCX -PCOMn' where n represents
  98.         the number of the com port used.
  99.       - startup SP
  100.       - if there should be problems continus to read
  101.       - the command 'TFPCX -U' will remove the driver
  102.         from memory
  103.     
  104. How it works
  105. ------------
  106.    TFPCX is a TSR program, which must be activated before SP
  107.    is called. TFPCX installs itself in memory. After that you
  108.    get back to the DOS prompt and may start the next program.
  109.    The system will now behave as if you had a normal TNC with
  110.    a terminal progam. You may be connected from outside and
  111.    incoming messages may be stored. As soon as the terminal
  112.    program is started you will see the incoming text on the
  113.    screen. Communicatio with SP is done with a sofware interrupt.
  114.    TFPCX can be compared with the module L2 which is part of the
  115.    Baycom package by Flori(DL8MAT) and Johannes (DG3RBU). SP
  116.    takes the role of the terminal program as SCC does with Baycom.
  117.    The real new compared to TFPCR is, that TFPCX can directly
  118.    controle a modem and is capable of sending and receiving
  119.    AX25 frames without the need for a TNC. TFPCX uses a different
  120.    methode than Baycom which has advantages and disadvantagess.
  121.    As the required timing standart, the system timer (8253
  122.    chanel 0) is used, which drives interrupt 8 3600 times
  123.    per second active. That requires a minimum of CPU power.
  124.    A XT running at 4.77 MHz is most likly not fast enough for
  125.    TFPCX and SP, but 8MHz probably should be sufficient.
  126.    The biggest problem is that the interrupt may not be delayed
  127.    too long otherwise incoming packet will not be decoded
  128.    properly and outgoing packets will be corrupted. This may happen
  129.    when e.g. accessing the disk. A AT should have no problems. Best
  130.    would be if you try it yourself. Some more hints will follow.
  131.    
  132.    Another problem are programs also making use of the timer chip
  133.    like MS-Windows, some mose drivers or MS-QuickC 2.51 ( the compiler
  134.    I use ). You should not use any of these programs as long as 
  135.    TFPCX is active. Other wise you will be punished with a wrong
  136.    system time, slow running system or even system crash.
  137.    
  138.    Up to now I only talked about disadvantages. Now some advantages:
  139.    Not talking about more features in SP then in Baycom, which is 
  140.    available for a longer time, TFPCX does not require a full
  141.    compatible COM port, because it will be used as a simple
  142.    I/O latch. There is no need that the port can drive an interrupt
  143.    so you may also use anny available LPT port ( e.g. for DigiCom
  144.    modems, which produce ttl level only). Some hope for those
  145.    people who were not successfull with the Baycom modem.!?
  146.    
  147. Modem connection
  148. ----------------
  149.    It was not possible for me also to develope a new modem, there are
  150.    others who do it better. So I adopted the Baycom 'standart',
  151.    which already is in use by many YL's and OM's. Additionally you
  152.    may connect another modem  ( e.g. DigiCom) to the Centronics
  153.    port. Here is the pinout of the interface :
  154.    
  155.   Com port :
  156.   Signal    25-pin    9-pin    used as
  157.   DTR        20        4       transmit data +/- 10 V
  158.   RTS        4         7       PTT, high active, -10V=RX, +10V=TX
  159.   CTS        5         8       receive data
  160.   GND        7         5       ground
  161.   
  162.   LPT port :
  163.   signal    25-pin             used as
  164.   DATA7     8                  transmit data TTL level
  165.   DATA8     9                  PTT, high active, 0V=RX, 5V=TX
  166.   BUSY      11                 receive data
  167.   GND       18-25              ground
  168.   
  169. TheFirmware v2.1c
  170. -----------------
  171.    Here some short notes how TF v2.1c is realized within TFPCX.
  172.    The Firmware may be used in two different modes ( terminal and
  173.    host mode ) just like with every TNC2. The only difference to a
  174.    normal TNC is, that data are not exchanged via a serial port but
  175.    with the use of software interrupts. The various functions of the
  176.    interrupt are described in the apendix.
  177.    
  178.    When in terminal mode TFPCX can be used as a normal terminal which
  179.    must use the interrupt. Such a terminal routine is already contained
  180.    in TFPCX. The Firmware now offers the user a number of commands, which
  181.    start with the escape key and are executed pressing the enter key.
  182.    The apendix contains a short summary of all implemented commands. 
  183.    In [2] you will find a detailed description of TheFirmware.
  184.    The following commands have not been implemented :
  185.    'A' 'E' 'H' 'K' 'QRES' 'Z' '@K'. The terminal mode is not the best
  186.    solution. SP will use host mode of TheFirmware. TFPCX has been
  187.    compiled for 10 channels.
  188.  
  189.    The TF v2.1c is probably not the state of the art ( v2.3 is 
  190.    currently available ) because newer protocol elements are not
  191.    implemented (IPOLL, DAMA, RTT), but is still in use with many TNCs.
  192.    If there is a DAMA digipeater in Berlin I will think of an
  193.    extension. Realized is a defensive slot time handling ( the
  194.    software will wait in any case for the slot time before it
  195.    starts to transmit ). If someone wnats to work in full duplex
  196.    ( for what ever reasons ) he may do so ( enter the command 
  197.    '@D1' to switch to fdx ) but keep in mind that this will put
  198.    some extra load on the CPU. So probably you should not do
  199.    so on an XT. In simplex, TFPCX will not decode incoming packets
  200.    when it is transmitting.
  201.    
  202. Startup of TFPCX
  203. ----------------
  204.    TXPCX is started with the following command line at the DOS
  205.    prompt :
  206.    TFPCX [-PCOMn | -PLPTn] [-Bnnnn] [-Ixx] [-N] [-D] [-Ffile]
  207.    [] = optional
  208.    |  = alternative
  209.    n  = decimal number
  210.    x  = hex number
  211.    All parameters are optional and mus begin with the minus sign.
  212.    Additional paarameters must be seperated with a space. Within
  213.    a parameter string no spaces are allowed. The software is not
  214.    case sensitive. After successful startup you should see the
  215.    following startup screen :
  216.  
  217.   ┌──────────────────────────────────────┐
  218.   │  TFPCX v1.00 (Sep 11 1991) by Y51GE  │
  219.   │ TF v2.1c by NORD><LINK (DC4OX/DF2AU) │
  220.   │          Portions by DL1MEN          │
  221.   │     Free for non-commercial usage    │
  222.   ├──────────────────────────────────────┤
  223.   │ COM1, 1200 Baud, Int FE, 10 Channels │
  224.   └──────────────────────────────────────┘
  225.    and the dos prompt should appear. TFPCX is now installed and
  226.    uses approximately 46 Kb of main memory. Here an explanation
  227.    of all command line options :
  228.    -PCOMn   (Baycom-) modem attached to COM port n
  229.             ( possible are COM1 to COM4 )
  230.    -PLPTn   Modem attached to LPTn ( LPT1 to LPT4 )
  231.    The bias address of the comm port will be retrieved from
  232.    the bios data area. But keep in mind that some versions 
  233.    of the bios don't do that for COM3 and COM4.
  234.    -Bnnn Baudrate at modem (300,1200,2400,4800,9600)
  235.    The maximum baudrate is limited by the cpu power. 9600
  236.    is perhaps a bit too much ( if there is 80586, maybe than).
  237.    For other baudrates then 1200 you can not use the Baycom modem.
  238.    If 300 baud are used the system clock will run false about
  239.    30 seconds per hour.
  240.    -Ixx Software interrupt for communication with SP ( 40-FF)
  241.    The default value is FE. This option is only required if other
  242.    programs use a different interrupt.
  243.    -N Supress system messages
  244.    If you dislike the appearance of messages you may switch them
  245.    off using this option.
  246.    -D Test mode ( debug)
  247.    When in this mode each timer interruppt will produce a change
  248.    of the edge at the speaker input. At 1200 baud a clean 3600 Hz
  249.    tone should be heard ( 3 * baud rate ). The tone should sound
  250.    more or less clean. If the interruppt is delayed too long the
  251.    tone will heavily distorted. If you only hear that noise, than
  252.    probably your computer is too slow. it is difficult to give a
  253.    limit because there will always be some basic noise. But if
  254.    nothing is heard ( except at 9600 baud, which is 29 kHz )
  255.    something serious is wrong.
  256.    -Ffile Initialization file ( default name TFPCX.INI)
  257.    If this file is read all characters from it will be transmitted
  258.    to the Firmware in terminal mode to enable default setting
  259.    of parameters. This may be of special interest if the program
  260.    should run in background mode without staing SP. During noraml
  261.    operation you will not need this option. The file will be searched
  262.    for in the current directory if the full pathname is not specified.
  263.    Each '^' character will be translated to an escape charater, which
  264.    is the first character when entering a command in terminal mode.
  265.    Linefeeds will be filtered, so that you can create the file using
  266.    your favourate ASCII text editor. As an example :
  267.    ^F 6
  268.    ^I MYCALL
  269.    ^N 16
  270.    ^O 2
  271.    ^P 64
  272.    ^R 1
  273.    ^T 25
  274.    ^U 1 Welcome in where-ever - TFPCX V1.00 - SP offline
  275.    ^W 25
  276.    All options will be displayed when entering the command 'TFPCX -H'
  277.    at the DOS prompt. If you enter TFPCX at the DOS prompt, the default
  278.    options are -PCOM1 -B1200 -IFE. If you are working on short wave at
  279.    300 baud most likely the following command exemple will do :
  280.    TFPCX -PLPT1 -B300
  281.    
  282. Installing TFPCX
  283. ----------------
  284.    (1) Install SP just if you would work with TFPCR ( see [1]).
  285.    Specifically the following lines should be found in SP.CFG
  286.    ( with SP6 CONFIG.SP) :
  287.    CFG=TNCS:1
  288.    CFG=PORT0:5
  289.    CFG=CHANS0:10
  290.    SP version before 5.02 should not be used, because the TFPCR
  291.    interface may not be incompatible to the current version.
  292.    Highloading of the driver has not been tested with MSDOS
  293.    or DRDOS V5.0. Those of you who are willing to try it are
  294.    welcome, set CFG=PORT0:5H.
  295.    
  296.    This version assumes that TFPCX uses one TNC only. Multi
  297.    TNC operation has not been tested but should theoretically
  298.    be possible. Then TFPCX is most likely only usable for one
  299.    HF port and TFPCR may not be loaded simultaniously. It must
  300.    be clear that interruppts coming from serial ports which are
  301.    connected to TNCS, may make it impossible to receive or 
  302.    transmit high quality AX25 frame. That is also why a fast
  303.    PC is required ( how fast I don't know ).
  304.    
  305.    All files belonging to TFPCR (TFPCR.COM, UNTFPC.EXE,
  306.    AUTOKISS.CFG ) may be removed from the SP directory ( but
  307.    NOT from your original diskette ). Instead you copy TFPCX.EXE
  308.    to same directory where SP.EXE is installed.
  309.    
  310.    (2) Now connect the modem to COM1-4 or LPT1-4 and startup
  311.    TFPCX. If you are not using COM1, pass the port with the
  312.    option -P to the program. If the system slows down
  313.    dramatically ( specially during disk accesses ) probably
  314.    the used baud rate is too high. Perhaps you may then start
  315.    TFPCX in terminal mode ( see below ) which may only aply
  316.    to computers where Baycom does not work.
  317.    
  318.    (3) Next startup SP. If SP's startup message is not displayed
  319.    on the screen, 'TNC#0 - (TFPCR / FE) in Hostmode', something
  320.    went wrong during installation of SP. Now look for a QRG with
  321.    packet signals and enter the command <ESC> MISUC to turn
  322.    monitoring on, you should see incoming packets. If no frames
  323.    are displayed exit from SP and remove TFPCX from memory with
  324.    the command TFPCX -U. Now restart TFPCX with the extra option
  325.    -D. Now a 3600 Hz (at 1200 baud) should be heard from the PC's
  326.    internal speaker. If nothing is heard, the timer may be
  327.    incompatible ( stop everything and get a 100 % compatible PC )
  328.    or the internal speaker is defect( yes, I already had that bug).
  329.    Now restart SP. If the tone changes to noise only ( execept
  330.    during loading of the program ), the PC is not fast enough
  331.    for the interruppts of the timer chip. If the tone is
  332.    relatively clean, the failure could be the modem itself
  333.    or the TRX.
  334.    
  335.    (4) If the monitor is working you may try a connect. Here
  336.    the PTT should be carefully watched. Theorectically all
  337.    should work now properly. Think also that receiving frames
  338.    works perfectly but transmitting frames does not.
  339.    
  340. Removing TFPCX from memory
  341. --------------------------
  342.    You remove TFPCX from memory with the command 'TFPCX -U'
  343.    at the DOS prompt. With TFPCX no extra program is required
  344.    to remove it from memory.
  345.    
  346. Terminal mode
  347. -------------
  348.    With the command TFPCX -T at the DOS prompt a simple terminal 
  349.    emulator will be started, so SP is not needed. But before that
  350.    TFPCX must loaded into memory ( as described above ). So the 
  351.    program is call twice, but with different options at the DOS
  352.    prompt. With ALT-X the terminal program is terminated, but before
  353.    that you should disable monitoring if it was active with the
  354.    command <ESC> 'MN', or monitoring will grap memory. Then SP may
  355.    have problems starting up. If you only work in terminal mode
  356.    I recommend to use the option -F to use default settings. The
  357.    following batch file will be of some help :
  358.         @echo off
  359.     tfpcx -n -f
  360.     tfpcx -t
  361.     tfpcx -n -u
  362.  
  363. Summary
  364. -------
  365.    At the end I want to share some expierience with you. I know
  366.    that the presented solution is probably not without any problems.
  367.    For newcomers I recommend Baycom, also SP is not so simple to
  368.    handle. TFPCX is for hams already acustomed to SP, who do not
  369.    want to get a TNC or want to operate portable and have time
  370.    working with a PC and probably with one of the most comfotable
  371.    terminal programs. If you are not one of those fell free using
  372.    TFPCX.
  373.    
  374.    Because of increasing baud rates it may be useless getting the
  375.    program. to give you some ideas here is a table what you can
  376.    expect from a PC. The table is an approximation and without
  377.    any guaranty.
  378.    
  379.    PC        XT    XT    286    386
  380.    MHz        5    8    12    20
  381.    -----------------------------------------
  382.    baud        ST    ST    ST    ST
  383.    300        **    **    **    **
  384.    1200        /?    **    **    **
  385.    2400        //    /?    **    **
  386.    4800        //    //    ??    **
  387.    9600        //    //    //    ??
  388.    
  389.    S = with SP        * = possible    ? = don't know
  390.    T = Terminal mode    / = not possible
  391.    
  392.    You see there is a wide field for experiments. Test results are
  393.    always welcome. Test have been carried aout under the following
  394.    conditions.
  395.    - PC :    Carry-I           (AT/286 12MHz)
  396.            Amstrad PC 1512       (XT/8086 8 MHz)
  397.         Tulip PC compact 2 (XT/V20 >9MHz)
  398.    - Baycom modem connected to COM1 or COM2
  399.    - 1200 baud
  400.    - SP 5.02.07 and 6.00.00
  401.    
  402.    As one can see not all has been tested so you never know what
  403.    will happen next. With the Amstrad PC do not load the mouse driver
  404.    otherwise the clock will go wrong if using TFPCX.
  405.    
  406.             *  *  *
  407.             
  408.    Those who are interested in the program send a formatted diskette
  409.    and a self addressed diskette mailer and enough IRC's to :
  410.            René Stange
  411.         O.-Grotewohl-Ring 34
  412.         O-1260 Strausberg
  413.   possible diskettes : 3 1/2" 720K or 1.44M
  414.                        5 1/4" 360 ( NO High Density)
  415.   I do want to make profit sso stick to the above. I don't have 
  416.   the money to do more then copying and taking the envelope to
  417.   the post office.
  418.   
  419.   Bugreports, testresults and enhancement requests are welcome
  420.   
  421.   73's de René, Y51GE @ DB0GR.DEU.EU
  422.   
  423.  
  424.  
  425.             Apendix
  426.             -------
  427. TFPCX interruppt functions
  428. --------------------------
  429.    There are three subfunctions which are selected by a proper
  430.    value in register AH passed to TFPCX. On return AX holds
  431.    the result or FFFF if an invalid function has been selected.
  432.    AH = 1    test for a received character
  433.    return:    AX = 0 no character
  434.            AX = 1 character ready
  435.         
  436.  
  437.    AH = 2    Get a received character. Call this only
  438.            after function AH=1 returned a 1
  439.    return:    AL character
  440.    
  441.    AH = 3    Send a character to the Firmware
  442.    Parameter:    AL character to send
  443.    
  444. Commands of TheFirmware v2.1c [2]
  445. ---------------------------------
  446.   Command    parameter        desciption
  447.   C        call1 [call2..call9]    connect path (chan0: unproto)
  448.   D                    disconnect
  449.   F (4)        1..15            delay for answer (seconds)
  450.   G        [0]            get information in host mode
  451.           [1]            get status in host mode
  452.   JHOST(0)    0            terminal mode on
  453.           1            host mode on
  454.   L        [0..10]            display status for channel
  455.   M (IU)    NIUSC+-            monitor mode
  456.   N (10)    0..255            P-persistence
  457.   R (0)        0/1            digipeater off/on
  458.   S (1)        1..10            channel number, 0 = unproto
  459.   T (30)    0..127            txdelay ( 10ms steps )
  460.   U (0)        0/1 [text]        enable/disable connect text
  461.   V (2)        1/2            protocol version 1/2
  462.   W (10)    0..127            time slot for P-presistence
  463.                       ( 10 ms steps )
  464.   X (1)        0/1            disable/enable PTT
  465.   Y (10)    0..10            Maximum number of connects
  466.   @B                    display number of free buffers
  467.   @D (0)    0/1              FDX off/on
  468.   @S                    display link status
  469.   @T2 (100)    0..255            timer T2 ( 10 ms steps )
  470.   @T3 (18000)    0..32767        timer T3 ( 10 ms steps )
  471.   @v (0)    0/1            disable/enable call checking
  472.   [] optional parameter
  473.   () default value
  474.   
  475. Literature
  476. ----------
  477.   [1] DL1MEN : Manual for Eskay Packet (SP) for v5.02 and above
  478.   [2] NORD><LINK : documentation for TheFirmware 2.1c
  479.       ( May be available in PBBS's)
  480.   [3] DL8MBT, DG3RBU: Baycom v1.40 - manual
  481.   
  482.